import request from '@/utils/request'

// 获取状态信息
export function getMonitorStateInfo(data) {
  return request({
    url: '/monitor_api/monitor/getMonitorStateInfo',
    method: 'post',
    data: data
  })
}

// 获取任务信息
export function getMonitorTask(data) {
  return request({
    url: '/monitor_api/monitor/getMonitorTask',
    method: 'post',
    data: data
  })
}

// 获取任务信息
export function getMonitorTaskCount(data) {
  return request({
    url: '/monitor_api/monitor/getMonitorTaskCount',
    method: 'post',
    data: data
  })
}

// 获取资源信息
export function getMonitorResource(data) {
  return request({
    url: '/monitor_api/monitor/getMonitorResource',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function getCenterCluster(data) {
  return request({
    url: '/monitor_api/monitor/getCenterCluster',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function selectMonitorState(data) {
  return request({
    url: '/monitor_api/monitor/selectMonitorState',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function selectClusterResource(data) {
  return request({
    url: '/monitor_api/monitor/selectClusterResource',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function selAllCluster(data) {
  return request({
    url: '/monitor_api/monitor/selAllCluster',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function selAllCm(data) {
  return request({
    url: '/monitor_api/monitor/selAllCm',
    method: 'post',
    data: data
  })
}

// 获取全部集群状态列表
export function getAllList(data) {
  return request({
    url: '/monitor_api/monitor/selAllState',
    method: 'post',
    data: data
  })
}

// 获取集群状态信息
export function getAllData(data) {
  return request({
    url: '/monitor_api/monitor/selNodeInfo',
    method: 'post',
    data: data
  })
}
// 获取历史运行状态
export function getAllHistory(data) {
  return request({
    url: '/monitor_api/monitor/selAllHisState',
    method: 'post',
    data: data
  })
}

// 获取中心集群信息
export function selTaskInfo(data) {
  return request({
    url: '/monitor_api/monitor/selTaskInfo',
    method: 'get',
    data: data
  })
}

// 获取中心集群信息
export function selTaskCount(data) {
  return request({
    url: '/monitor_api/monitor/selTaskCount',
    method: 'post',
    data: data
  })
}

// 任务统计图表
export function selTaskJobCount(data) {
  return request({
    url: '/monitor_api/monitor/selTaskJobCount',
    method: 'post',
    data: data
  })
}

// 任务统计图表
export function selTaskJobTime(data) {
  return request({
    url: '/monitor_api/monitor/selTaskJobTime',
    method: 'post',
    data: data
  })
}

// 集群资源使用
export function selClusterResourceInfo(data) {
  return request({
    url: '/monitor_api/monitor/selClusterResourceInfo',
    method: 'post',
    data: data
  })
}

// 集群资源使用数量统计
export function selResourceCount(data) {
  return request({
    url: '/monitor_api/monitor/selResourceCount',
    method: 'post',
    data: data
  })
}

// 集群资源使用明细
export function selDetailResourceInfo(data) {
  return request({
    url: '/monitor_api/monitor/selDetailResourceInfo',
    method: 'post',
    data: data
  })
}

// 集群资源使用异常
export function selResourceYcInfo(data) {
  return request({
    url: '/monitor_api/monitor/selResourceYcInfo',
    method: 'post',
    data: data
  })
}

export function selResourceSylInfo(data) {
  return request({
    url: '/monitor_api/monitor/selResourceSylInfo',
    method: 'post',
    data: data
  })
}

export function tableList(data) {
  return request({
    url: '/monitor_api/cmState/queryServiceRealTime',
    method: 'post',
    data: data
  })
}

export function serviceStatus(data) {
  return request({
    url: '/monitor_api/cmState/queryServiceState',
    method: 'post',
    data: data
  })
}

export function userStatus(data) {
  return request({
    url: '/monitor_api/cmState/queryRoleState',
    method: 'post',
    data: data
  })
}

export function getFormData(data) {
  return request({
    url: '/monitor_api/cmState/queryRoleChecks',
    method: 'post',
    data: data
  })
}

export function queryServices(params) {
  return request({
    url: '/monitor_api/cmState/queryServices',
    method: 'get',
    params
  })
}
export default { getMonitorStateInfo, getMonitorTask, getMonitorResource, getCenterCluster, selectMonitorState,
  getMonitorTaskCount, selectClusterResource, selAllCluster, getAllList, getAllData, getAllHistory, selTaskInfo, selTaskCount, selTaskJobCount, selTaskJobTime, selAllCm,
  selClusterResourceInfo, selResourceCount, selDetailResourceInfo, selResourceYcInfo, selResourceSylInfo, tableList,
  serviceStatus, userStatus, getFormData, queryServices
}
